<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>两侧固定，中间自适应</title>
    <style>
        .box{
            display: flex;
            height: 100px;
        }
        .left,
        .right{
            width: 100px;
            height: 100px;
            background-color: red;
        }
        .center{
            flex: 1;
            background-color: yellow;
        }
    </style>
    </style>
</head>
<body>
    <div class="box">
      <div class="left">左</div>
      <div class="center">中</div>
      <div class="right">右</div>
    </div>
</body>
</html>